import React from 'react';
import { message } from 'antd';
import BreadCrumb from '@/view/comps/breadcrub/breadcrub';

class Dashboard extends React.Component {
	constructor(props) {
		super(props);
	}
	componentDidMount() {
		console.log('dashboard执行');
		this.getUseInfo();
	}
	getUseInfo = () => {
		AJAX({
			method: 'post',
			url: '/getInfo',
			data: {}
		}).then(res => {
			if (res.errNo === 0) {
				console.log('首页登录状态验证成功！');
			}
		}, err => message.error(err.errMsg || '请求错误'));
	}
	render() {
		return (
			<div>
				<BreadCrumb bread={[{title: 'Dashboard'}]}/>
				<div className="page-container">
					我是dashboard
					用来初始化展示页面各种访问数据...
					再来测试一下
				</div>
			</div>
		);
	}
}
export default Dashboard;
